<!DOCTYPE html>

<html class="no-js">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title></title>
  <meta name="description" content="" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />

  <script src="https://cdn.staticfile.org/axios/0.19.0-beta.1/axios.js"></script>

  <script src="../../cdn/vue/vue.global.min.js"></script>

  <link rel="stylesheet" href="../../cdn/element-plus/index.css" />
  <script src="../../cdn/element-plus/index.full.min.js"></script>
  <link rel="stylesheet" href="../../../lib/index.css" />
  <script src="../../../lib/avue.js"></script>
</head>

<body>
  <div id="app">
    <avue-select :dic="list" ref="tree" v-model="data">
      <template #="{ item }">
        <span class="el-tree-node__label">
          <el-icon>
            <el-icon-user-solid />
          </el-icon>
          {{ item.label }}
        </span>
      </template>
    </avue-select>
  </div>
</body>
<script>
  var app = Vue.createApp({
    data() {
      return {
        data: '',
        list: [{
          value: 0,
          label: '一级部门',
          children: [
            {
              value: 1,
              label: '一级部门1',
            }, {
              value: 2,
              label: '一级部门2',
            }
          ]
        }, {
          value: 10,
          label: '一级部门1',
          children: [
            {
              value: 11,
              label: '一级部门11',
            }, {
              value: 12,
              label: '一级部门21',
            }
          ]
        }]
      }
    },
    methods: {

    }
  })
  app.use(ElementPlus)
  app.use(AVUE)
  app.mount('#app')
</script>

</html>